package com.xy.biz.xd.domain.enums;

import com.xy.lang.domain.KeyValue;
import com.xy.lang.enums.CodeEnum;

/**
 * @author Greekn Zhang
 * @date 2021/12/10 17:30
 * @description
 */
public enum DocumentFlowBatchTypeEnum implements CodeEnum {

    UNBATCH(0, "非批量"),
    BATCH_PARENT(1, "批处理父包"),
    BATCH_SUBFILE(2, "批处理子文件");

    private int code;
    private String name;

    DocumentFlowBatchTypeEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public KeyValue<Integer, String> toKeyValue() {
        return new KeyValue<>(this.code, this.name);
    }
}
